package com.heima.common.tess4j;

public class TestTess4j {
    /*public static void main(String[] args) throws TesseractException {
        //1. 创建tess4j 的核心的对象
        Tesseract tesseract = new Tesseract();

        //2. 设置语言库的路径
        tesseract.setDatapath("E:\\tessdata");

        //3. 设置语言
        tesseract.setLanguage("chi_sim");

        //4. 识别图片
        File file = new File("E:\\123.png");
        String str = tesseract.doOCR(file);
        str = str.replaceAll("\\r|\n", "-").replaceAll(" ","");
        System.out.println(str);
    }*/
}
